package com.webchat.ugc.controller.mall.im;

import com.webchat.common.bean.APIResponseBean;
import com.webchat.common.bean.APIResponseBeanUtil;
import com.webchat.domain.vo.response.mall.im.MallChatListItemResponseVO;
import com.webchat.rmi.ugc.mall.im.MallChatAccountClient;
import com.webchat.ugc.service.mall.im.MallChatAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
public class MallChatAccountController implements MallChatAccountClient {


    @Autowired
    private MallChatAccountService mallChatAccountService;

    @Override
    public APIResponseBean<List<MallChatListItemResponseVO>> list(String account, String chatAccount, Long lastTime, int size) {
        List<MallChatListItemResponseVO> accountList = mallChatAccountService.list(account, chatAccount, lastTime, size);
        return APIResponseBeanUtil.success(accountList);
    }
}
